#ifndef __RTSP_CMD_LINE_DEAL_H__
#define __RTSP_CMD_LINE_DEAL_H__

#include "RtspServer.h"
#include "ErrorInfo.h"

//rtsp process command recvive info
typedef struct StruCmdItem
{
	char strCommand[20];
	char strUrl[MAX_URL_LENGTH];
	char strRtspVersion[10];
	int iSeq;
	char strUserAgent[MAX_LINE_LENGTH];
	char strAccept[MAX_LINE_LENGTH];
	char strTransport[MAX_LINE_LENGTH];
	int iMarkTcp;		//1 tcp; 2 udp
	int iRtpPort;
	int iRtcpPort;
	char strSession[MAX_SESSION_LENGTH];
	float iRangeStart;
	float iRangeEnd;
}CmdItem,*pCmdItem;

//rtsp command head field and head field deal with function
typedef struct StruCmdLineDeal
{
	char *pstrHeaderField;
	int (*pHeaderFieldHandler)(char *ppstrLine,CmdItem *pcmditem);
}CmdLineDeal,*pCmdLineDeal;

int DoAllLineRequest(char *,CmdItem*);
int DoCommandLine(char *,CmdItem*);
int DoLineCSeq(char *,CmdItem*);
int DoLineUserAgent(char *,CmdItem*);
int DoLineAccept(char *,CmdItem*);
int DoLineTransport(char *,CmdItem*);
int DoLineSession(char *,CmdItem*);
int DoLineRange(char *,CmdItem*);








#endif
